<%-- 
    Document   : index
    Created on : 20-Jan-2013, 22:16:54
    Author     : Joseph
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="css/style.css" rel="stylesheet" type="text/css"/>

        <link href="css/style2.css" rel="stylesheet" type="text/css"/>
        <script type="text/javascript" src="js/scrips.js"></script>
        <script type="text/javascript" src="js/scrips2.js"></script>
        <title>Student Information</title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>

    </head>

    <header>


    </header>
    <body>

        <section id="etiqetas2">
            <article>

                <div class="registration">
                    <h1><center>CRUD</center></h1>
                    <form action="./StudentServlet" method="POST">
                        <table>
                            <tr>
                                <td>Student ID</td>
                                <td><input type="text" name="studentId" required="true" value="${student.studentId}" /></td>
                            </tr>
                            <tr>
                                <td>First Name</td>
                                <td><input type="text" name="firstname" value="${student.firstname}" /></td>
                            </tr>
                            <tr>
                                <td>Last Name</td>
                                <td><input type="text" name="lastname" value="${student.lastname}" /></td>
                            </tr>
                            <tr>
                                <td>Year Level</td>
                                <td><input type="text" name="yearLevel" value="${student.yearLevel}" /></td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <input type="submit" name="action" value="Add" />


                                </td>                
                            </tr>            
                        </table>
                    </form>        




                    <%-- 
                                        <form action="./StudentServlet" method="POST">

                    Student ID
                    <input class="textf" type="text" name="studentId" value="${student.studentId}" />
                    
                    First Name
                    <input class="textf" type="text" name="firstname" value="${student.firstname}" />


                    Last Name
                    <input  class="textf" type="text" name="lastname" value="${student.lastname}" />


                    Year Level
                    <input class="textf" type="text" name="yearLevel" value="${student.yearLevel}"/>



                    <input class="buttom" type="submit" name="action" value="Add" />
                    <input class="buttom" type="submit" name="action" value="Edit" />
                    <input class="buttom" type="submit" name="action" value="Delete" />
                    <input class="buttom" type="submit" name="action" value="Search" />



                </form> 
                    --%>
                </div>

            </article>
            <article>
               
                    <table border="1">
                        <th>ID</th>
                        <th>First Name</th>
                        <th>Last Name</th>
                        <th>Year Level</th>
                            <c:forEach items="${allStudents}" var="stud">
                            <tr>
                                <td>${stud.studentId}</td>
                                <td>${stud.firstname}</td>
                                <td>${stud.lastname}</td>
                                <td>${stud.yearLevel}</td>
                            </tr>
                        </c:forEach>
                    </table> 
               
            </article>

            <article>
                <div class="CSSTableGenerator" >
                    <table >
                        <tr>
                            <td>
                               Id
                            </td>
                            <td>
                                First Name
                            </td>
                            <td >
                                Last Name
                            </td>
                            <td>
                                Year Level
                            </td>
                        </tr>
                        <c:forEach items="${allStudents}" var="stud">
                            <tr>
                                <td>${stud.studentId}</td>
                                <td>${stud.firstname}</td>
                                <td>${stud.lastname}</td>
                                <td>${stud.yearLevel}</td>
                            </tr>
                        </c:forEach>
                       
                    </table>
                </div>

            </article>
            <article>

                <div class="registration">

                    <h1><center>CRUD</center></h1>
                    <form action="./StudentServlet" method="POST">
                        <table>
                            <tr>
                                <td>Student ID</td>
                                <td><input type="text" name="studentId" value="${student.studentId}" /></td>
                            </tr>
                            <tr>
                                <td>First Name</td>
                                <td><input type="text" name="firstname" value="${student.firstname}" /></td>
                            </tr>
                            <tr>
                                <td>Last Name</td>
                                <td><input type="text" name="lastname" value="${student.lastname}" /></td>
                            </tr>
                            <tr>
                                <td>Year Level</td>
                                <td><input type="text" name="yearLevel" value="${student.yearLevel}" /></td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <input type="submit" name="action" value="Search" />
                                    <input type="submit" name="action" value="Edit" />
                                    <input type="submit" name="action" value="Delete" />
                                </td>                
                            </tr>            
                        </table>
                    </form>   
                </div>

            </article>

        </section>


        <%--
                <section class="etiqetas2">

            <div class="registration">
                <h2>Create an Account</h2>

                <form id="RegisterUserForm" action="" method="post">
                    <fieldset>
                        <p>
                            <label for="name">Name</label>
                            <input id="name" name="name" type="text" class="text" value="" />
                        </p>

                        <p>
                            <label for="tel">Phone Number</label>
                            <input id="tel" name="tel" type="tel" class="text" value="" />
                        </p>

                        <p>
                            <label for="email">Email</label>
                            <input id="email" name="email" type="email" class="text" value="" />
                        </p>

                        <p>
                            <label for="password">Password</label>
                            <input id="password" name="password" class="text" type="password" />
                        </p>

                        <p><input id="acceptTerms" name="acceptTerms" type="checkbox" />
                            <label for="acceptTerms">
                                I agree to the <a href="">Terms and Conditions</a> and <a href="">Privacy Policy</a>
                            </label>
                        </p>

                        <p>
                            <button id="registerNew" type="submit">Register</button>
                        </p>
                    </fieldset>

                </form>
            </div>

        </section>


        --%>



        <section id="etiqetas3"> 

        </section>






    </body>
    <footer>

    </footer>    
</html>
